package com.waterworld.watch.mine.activity;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import butterknife.BindView;
import butterknife.ButterKnife;
import com.waterworld.watch.R;
import com.waterworld.watch.common.activity.BaseActivity;
import com.waterworld.watch.common.util.ScreenAdapterUtil;

public class NotificationDetailActivity extends BaseActivity {

    @BindView(R.id.header_parent)
    LinearLayout headerParent;

    @BindView(R.id.header_back)
    ImageView headerBack; //返回按钮

    @BindView(R.id.header_title)
    TextView headerTitle; //标题

    @BindView(R.id.tv_content)
    TextView tvContent;

    @BindView(R.id.tv_time)
    TextView tvTime;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_message_detailed_info);
        ButterKnife.bind(this);
        initView();
        doClick();
    }


    private void initView(){
        String time = getIntent().getStringExtra("time");
        String content = getIntent().getStringExtra("content");
        setViewSize(headerParent, ViewGroup.LayoutParams.MATCH_PARENT, ScreenAdapterUtil.getHeightPx(this) / 10);
        headerTitle.setText("消息通知");
        headerBack.setVisibility(View.VISIBLE);
        headerTitle.setVisibility(View.VISIBLE);
        tvTime.setText(time);
        tvContent.setText(content);
    }

    private void doClick(){
        headerBack.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });
    }
}
